package cs383.GradUnit;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class aEndGame extends Activity {
	
	Button btnMainMenu;
	OnClickListener listenerMainMenu;
	TextView txtTitle;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.endgame);
        
        Bundle extras = getIntent().getExtras();
        
        txtTitle = (TextView)findViewById(R.id.EndGameScreen_txtTitle);
        txtTitle.setText(extras.getString("OUTCOME"));
        
        btnMainMenu = (Button)findViewById(R.id.EndGameScreen_btnMainMenu);
        listenerMainMenu = new OnClickListener(){

			@Override
			public void onClick(View v) {
				Intent mainMenu = new Intent(aEndGame.this,aMainMenu.class);
				startActivity(mainMenu);
				
			}
        	
        };
        btnMainMenu.setOnClickListener(listenerMainMenu);
        
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.endgame, menu);
        return true;
    }
}
